import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/students/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/students/infor/getInfor',
    method: 'get',
    params: { token }
  })
}

export function showInfor(token) {
  return request({
    url: '/students/infor/showInfor',
    method: 'get',
    params: { token }
  })
}
export function logout() {
  return request({
    url: '/students/logout',
    method: 'post'
  })
}

export function updateInfor(data) {
  return request({
    url: '/students/infor/updateInfor',
    method: 'post',
    data
  })
}


export function updatePwd(data) {
  return request({
    url: '/students/infor/updatePwd',
    method: 'post',
    data
  })
}

export function submitFile(data) {
  return request({
    url: '/students/file/submitFile',
    method: 'post',
    data,
    headers:{
      'Content-type':'multipart/form=date'
    }
  })
}

export function showFile(token) {
  return request({
    url: '/students/file/showFile',
    method: 'get',
    params:{token}
  })
}

export function deleteFile(data) {
  return request({
    url: '/students/file/deleteFile',
    method: 'post',
    data
  })
}

export function showSLogInfor(token) {
  return request({
    url: '/students/showLogInfor',
    method: 'get',
    params: { token }
  })
}

export function sendMsg(data) {
  return request({
    url: '/students/sendMsg',
    method: 'post',
    data
  })
}

export function showSendMsg(token) {
  return request({
    url: '/students/showSendMsg',
    method: 'get',
    params:{token}
  })
}

export function showReciveMsg(token) {
  return request({
    url: '/students/showReciveMsg',
    method: 'get',
    params:{token}
  })
}
export function reply(data) {
  return request({
    url: '/students/reply',
    method: 'post',
    data
  })
}

